<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        li {
            list-style: none;
        }

        img {
            vertical-align: top;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        #page {
            width: 1915px;
            height: 934px;

            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);

        }

        #page img {
            width: 100%;
        }
    </style>
</head>

<body>
    <div id="page">
        <img src="./智慧物流服务平台.png" alt="">
    </div>
</body>
<script>
    // 设计图宽度/高度  (16:9)
    var designWidth = 1920;
    var designHeight = 1080;

    resizeHandler();
    window.addEventListener("resize", resizeHandler)

    function resizeHandler() {
        // 设备宽高比 > 16:9
        var scale = (document.documentElement.clientWidth / document.documentElement.clientHeight) <= (designWidth / designHeight) ? document.documentElement.clientWidth / designWidth : document.documentElement.clientHeight / designHeight;


        console.log(document.documentElement.clientHeight, designHeight);

        var page = document.getElementById("page");
        page.style.transform = `translate(-50%, -50%) scale(${scale})`

    }



</script>

</html>